package org.jeecg.modules.rental.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.rental.entity.RentalArticle;
import org.jeecg.modules.rental.mapper.RentalArticleMapper;
import org.jeecg.modules.rental.service.IRentalArticleService;
import org.springframework.stereotype.Service;

/**
 * @Description: rental_article
 * @Author: jeecg-boot
 * @Date:   2024-06-20
 * @Version: V1.0
 */
@Service
public class RentalArticleServiceImpl extends ServiceImpl<RentalArticleMapper, RentalArticle> implements IRentalArticleService {

    @Override
    public RentalArticle getByCategory(String category) {
        return this.getOne(new QueryWrapper<RentalArticle>().eq("category", category));
    }

    @Override
    public IPage<RentalArticle> selectJoinPage(Page page, RentalArticle rentalArticle) {
        return baseMapper.selectJoinPage(page, rentalArticle);
    }
}
